package com.mt.api.modules.manager.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mt.api.modules.domain.BrandPayment;
import com.mt.api.modules.manager.IBrandPaymentManager;
import com.mt.api.modules.mapper.BrandPaymentMapper;
import org.springframework.stereotype.Component;

/**
 * @Author: plover
 * @Date: 2022-05-01
 * @Description:
 */
@Component
public class BrandPaymentManagerImpl extends ServiceImpl<BrandPaymentMapper, BrandPayment> implements IBrandPaymentManager {


    @Override
    public BrandPayment getByBrandId() {
        LambdaQueryWrapper<BrandPayment> wrapper = Wrappers.lambdaQuery();
        wrapper.last("limit 1");
        return baseMapper.selectOne(wrapper);
    }
}
